home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1633 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.7 KB

  1. Date: Sat, 18 Jun 94 14:31:18 MDT
  2. From: shenson@nyx10.cs.du.edu (Stephen Henson)
  3. Message-Id: <9406182031.AA19793@nyx10.cs.du.edu>
  4. X-Disclaimer: Nyx is a public access Unix system run by the University
  5.     of Denver.  The University has neither control over nor
  6.     responsibility for the opinions or correct identity of users.
  7. To: mint@terminator.rs.itd.umich.edu
  8. Subject: Directory slow down ...
  9.  
  10. Most of the points about directories have been covered already. If the directory
  11. is too big to fit entirely in the syscache it will thrash the filesystem a lot.
  12. This is exacerbated by the way the mintlib and some file utilities have to access
  13. the same file several times in a row requiring a repeated lookup. A quick solution
  14. is to increase the syscache size, either by recompiling or editing the binary.
  15. A better way would be to add a cookie cache to the kernel relpath2cookie function,
  16. something very simple like a single entry for the last lookup would cause a
  17. big performance win, though a larger cache would be even better.
  18.           I could also make the Minixfs lookup function speed up by having it
  19. search directories from the point the last search suceeded (if at all) instead
  20. of the start. Actually I'm looking into this for pl11.
  21.           I did some directory access speed checks some time ago. Basically
  22. making a directory with about 1024 entries and seeing how long it took to
  23. search it. I found it to be rather slow, as I've implied above. Well I thought
  24. it was slow until I tried it on a TOS filesystem ... It kept my computer busy
  25. for a few hours if nothing else. 
  26.           Now before anyone asks how you edit the binary here's how to do it.
  27. 1. Use the GCC utility 'cnm' to dump the symbol table of minix.xfs .
  28. 2. Note the values of the symbols _scache_size, _ucache_size and _icache_size.
  29. 3. Use your favourite binary editor to edit the binary at the points
  30.    _?cache_size+0x1c (0x1c is the size of the binary header), these are all
  31.    16 bits and show the cache sizes in K.
  32.  
  33. This is basically how you do binary configuration of a program, this can
  34. all be handled automatically by a program and nlist() used to lookup the symbol
  35. table. I never got round to finishing off my binary config program which would
  36. do all this more easily.
  37.           If you look at minixfs/global.h you'll see lots of other things can
  38. be configured like this, e.g. cache mode, sync time, the 'physical partition'
  39. options, default translation modes etc etc.
  40.           I could say a lot more about this, it is a very useful technique.
  41. For example you can change the default open modes (to use binary for example)
  42. or set up default paths for things like gcc etc. It is rather cleaner than
  43. having to override things all the time by filling up the environment.
  44. Steve.
  45.  
  46.